/*
 * @Descripttion: 说明
 * @version: V1.0
 * @Author: GaoWei
 * @Date: 2021-04-25 12:11:55
 * @LastEditors: GW
 * @LastEditTime: 2021-12-14 11:03:11
 */
import { axios } from '../../utils/request'

/**
 * 销售订单
 */
const api = {
    save: '/so/areaCalculation/save',
    examine: '/so/areaCalculation/examine',
    delete: '/so/areaCalculation/delete',
    getcode: '/so/areaCalculation/getCode',
    getBatchUrl: '/so/areaCalculation/getBatchExecutionStatisticsVos',//统计单个批次完成情况
}
/**
 * 保存
 */
export function save (data) {
    return axios({
        url: api.save,
        method: "post",
        data: data,
        timeout: 60000
    })
}
/**
 * 审核
 */
export function examine (data) {
    return axios({
        url: api.examine,
        method: "get",
        params: data
    })
}

/**
 * 删除
 */
export function remove (data) {
    return axios({
        url: api.delete,
        method: "DELETE",
        params: data
    })
}

/**
 * 获取单据编号
 */
export function getCode (data) {
    return axios({
        url: api.getcode,
        method: "get",
        params: data
    })
}

//导出面积计算表
export function exportAreaData (parameter) {
    return axios({
        url: '/so/areaCalculation/exportData',
        method: "get",
        params: parameter,
        responseType: 'blob'
    });
}

//报价
export function setPrice (data) {
    return axios({
        url: '/so/areaCalculation/setPrice',
        method: "post",
        data: data
    })

}

//统计项目完成情况
export function projectSituation (data) {
    return axios({
        url: '/so/areaCalculation/projectExecutionStatistics',
        method: "get",
        params: data
    })
}

//统计批次完成情况
export function patchSituation (data) {
    return axios({
        url: '/so/areaCalculation/areaCalculationMainStatistics',
        method: "get",
        params: data
    })
}


//根据 面积计算表主表ID 查询 出入库情况
export function getInOutRecord (data) {
    return axios({
        url: '/erp/barcodeInOutMain/getInOutRecord',
        method: "get",
        params: data
    })
}


//统计单个批次完成情况
export function getBatchApi (data) {
    return axios({
        url: api.getBatchUrl,
        method: "get",
        params: data
    })
}